home *** CD-ROM | disk | FTP | other *** search
- ;OCL{{{}}}
- ;OCL{{{ comments
- ; simulate exit-origami and save-and-exit-origami
- ;OCL}}}
- @if-using not(ocl-file-exit)
- @use (ocl-file-exit)
- ;OCL{{{ variable
- ( defvar ( exit-save ) )
- ;OCL}}}
- ;OCL{{{ exit-origami
- ( deffun exit-origami
- ( do
- ;OCL{{{ exit one buffer
- ( exit-buffer
- if in-prompt
- (
- ;OCL{{{ if last file, end macro, user can answer himself
- if =(used-buffers 1) ( return-from-macro ) fi
- ;OCL}}}
- ;OCL{{{ ask for answer
- begin-prompt-macro
- prompt-counter exit-save ( M_CHANGED_LEAVE " "? " )
- end-prompt-macro
- ;OCL}}}
- ;OCL{{{ put answer in stream
- screen-off
- if exit-save ( "Y ) else ( "N ) fi
- screen-on
- newline-and-indent
- ;OCL}}}
- ;OCL{{{ N -> ready!
- if =(exit-save 0) ( return-from-macro ) fi
- ;OCL}}}
- )
- fi
- )
- ;OCL}}}
- while 1
- )
- )
- ;OCL}}}
- ;OCL{{{ save-and-exit-origami
- ( deffun save-and-exit-origami
- ( do
- ( set exit-save current-buffer-id
- save-and-exit-buffer
- if =(exit-save current-buffer-id)
- ( return-from-macro )
- fi
- )
- while 1
- )
- )
- ;OCL}}}
- ;OCL{{{ undeclares
- ( undeclare ( exit-save ) )
- ;OCL}}}
- @fi
-